package com.mutual.reinsapi;

import com.mutual.reinsapi.entity.ReinsPolicyInterfDtoVo;
import com.mutual.reinsapi.entity.ReinsStatusDtoVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author panchen
 */
@FeignClient("reins-core")
@CacheConfig(cacheNames = "ReinsServiceApi")
public interface ReinsServiceApi {

    /**
     * 投保单生成危险单位
     * @param reinsPolicyInterfDtoVo 承保送再保信息
     * @return 返回核心提交核保调用再保接口返回信息对象
     */

    @PostMapping("/reins/savePrptDangerUnit")
    @ApiOperation("投保单生成危险单位")
    @Cacheable(unless = "#result == null || #result == \"\"")
    ReinsStatusDtoVo savePrptDangerUnit(@RequestBody ReinsPolicyInterfDtoVo reinsPolicyInterfDtoVo);
    /**
     * 投保单生成危险单位
     * @param reinsPolicyInterfDtoVo 承保送再保信息
     * @return 返回核心提交核保调用再保接口返回信息对象
     */

    @PostMapping("/reins/savePrppDangerUnit")
    @ApiOperation("投保单生成危险单位")
    @Cacheable(unless = "#result == null || #result == \"\"")
    ReinsStatusDtoVo savePrppDangerUnit(@RequestBody ReinsPolicyInterfDtoVo reinsPolicyInterfDtoVo);

}
